"use strict";

/** @type {import('sequelize-cli').Migration} */
const bcrypt = require("bcryptjs");
module.exports = {
  async up(queryInterface, Sequelize) {
    /**
     * Add seed commands here.
     */
    await queryInterface.bulkInsert(
      "Users",
      [
        {
          email: "747234246@qq.com",
          username: "admin",
          password: bcrypt.hashSync("123456", 10),
          nickname: "超厉害的管理员",
          sex: 1,
          avatar: "", //头像地址
          remark: "管理员",
          rolesId: "[1]", //权限ID
          roles: '["admin"]', //权限名
          phone: "18691824847", //电话
          status: 1, //启用
          createdAt: new Date(),
          updatedAt: new Date(),
        },
      ],
      {},
    );
  },

  async down(queryInterface, Sequelize) {
    /**
     * Add commands to revert seed here.
     *
     * Example:
     * await queryInterface.bulkDelete('People', null, {});
     */
  },
};
